<!DOCTYPE html>
<html>
    <head><meta http-equiv="content-type" content="text/html" charset="utf-8">
    <title>test</title>
    </head>
    <body></body>
    <a id="elem">点击</a>
        <script type="text/javascript">
        debugger;
        var bind = function(me,func){
            var bindfunc = function (){
                return func.apply(me ,arguments);
            }
            return bindfunc;
        };

            var elem = document.getElementById("elem");
            var obj = {
                tagname:"你好"
            };
            var clickHander = function(){
                debugger;
                alert(this,tagname);
            };

            var clickWrapper = bind(obj,clickHander);
            elem.onclick = clickWrapper;
        </script>

</html>